function list_push_back(list, el)
	el.prev = list.prev
	el.next = list
	list.prev.next = el
	list.prev = el
end

function list_unlink(el)
	local next = el.next
	local prev = el.prev
	prev.next = next
	next.prev = prev
end

function list_singleton(list)
	list.next = list
	list.prev = list
end